package org.curso;

public class StringCalculator {

	public static int add(String input) {
		int output = 0;
		for (String number : StringCalculatorParser.getNumbers(input))
			try {
				output += Integer.parseInt(number);
			} catch (NumberFormatException e) {
				return 0;
			}
		
		return output;
	}

}
